<?php
/**
 * Project: AIGC
 * Author: moufer <moufer@163.com>
 * Date: 2024/9/29 20:14
 */

namespace module\user\front;

use module\user\model\User;

use app\library\Interface\TotalInterface;

class Total implements TotalInterface
{
    public function totals(): array
    {
        return [
            'reg'   => '注册用户',
            'login' => '登录用户'
        ];
    }

    public function trends(): array
    {
        return [
            ['title' => '用户走势', 'names' => ['reg', 'login']]
        ];
    }

    public function reg(): int
    {
        return User::count();
    }

    public function login(): int
    {
        return -1;
    }
}